//
//  XhlProgressHUD.h
//  XhlProgressHUDDemo
//
//  Created by rogue on 2019/1/7.
//  Copyright © 2019 rogue. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

#pragma mark - ShowMessage
/**
 显示提示信息,默认0.8s
 
 @param msg 信息
 */
extern void xhl_showMessage(NSString *msg);

/**
 显示提示信息
 
 @param msg 信息
 @param duration 时间
 */
extern void xhl_showMessageWithDuration(NSString *msg,NSTimeInterval duration);

/**
 显示提示信息
 
 @param msg 信息
 @param progress 进度条
 */
extern void xhl_showProgress(NSString *msg,float progress);

/**
  加载框显示
 */
extern void xhl_hudLoading(void);

extern void xhl_hudLoadingMsg(NSString *msg);
/**
  加载框消失
 */
extern void xhl_hudDismiss(void);


@interface XhlProgressHUD : NSObject

#pragma mark - viewController
//加载框
+ (void)showLoading:(UIViewController *)viewController;
+ (void)showLoadingComplete:(UIViewController *)viewController
               hideComplete:(void (^)(void))hideComplete;

//提示框
+ (void)showTips:(UIViewController *)viewController tip:(NSString *)tip;
+ (void)showTips:(UIViewController *)viewController tip:(NSString *)tip delay:(float)delay;

+ (void)showTipsComplete:(UIViewController *)viewController
                     tip:(NSString *)tip
                   delay:(float)delay
            hideComplete:(void (^)(void))hideComplete;

+ (void)showProgress:(UIViewController *)viewController tip:(NSString *)tip schedule:(CGFloat)schedule;

#pragma mark - Window
//加载框
+ (void)showLoadingOnWindow;
+ (void)showLoadingOnWindowTip:(NSString *)tip;
//提示框
+ (void)showMessageOnWindow:(NSString *)tip;
+ (void)showProgressOnWindowTip:(NSString *)tip schedule:(CGFloat)schedule;
+ (void)showMessageOnWindow:(NSString *)tip delay:(float)delay;
+ (void)showMessageOnWindowComplete:(NSString *)tip delay:(float)delay hideComplete:(void (^)(void))hideComplete;


#pragma mark - hide
+ (void)hideLoading:(UIViewController *)viewController;
+ (void)hideLoadingOnWindow;

@end

NS_ASSUME_NONNULL_END
